package com.nd.qa.shareplate.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.convert.converter.Converter;
/**
 * <p>
 * <p>Description:日期转换器
 * <p>conpany
 * @author 黄坚
 * @createDate 2015-09-25 上午 11:13:17
 * @version 1.0
 */
public class DateConverter implements Converter<String, Date>{

	@Override
	public Date convert(String arg0) {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		try {
			return (Date)simpleDateFormat.parse(arg0);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return null;
	}



}
